<?php
    header("Content-Type:text/html;charset=utf-8");
    $username = $_POST["username"];
    $password = $_POST["password"];
  
    header("Content-Type:text/html;charset=utf-8");
    $conn = mysqli_connect('localhost','root','123456','gz2104'); 
   
    $sql = "INSERT INTO `login` VALUES (null,'$username','$password')";
    // 去表中查询
    $res = mysqli_query($conn,$sql);
    
  
    if(!$res){
      die('数据库链接错误' . mysqli_error($conn));
  }
  header(" ../pages/login.html");
  echo "注册成功";
  
    

?>
